package com.yuou.model;

import java.io.Serializable;
import java.util.Date;

import org.springframework.format.annotation.DateTimeFormat;

public class Bloger implements Serializable{
	public Bloger() {
	}
	
	public Bloger(Integer id, String name, String username, String password, String email, int status, int sex,
			String headImageUrl, Date createDate, int roleId,int deptId) {
		super();
		this.id = id;
		this.name = name;
		this.username = username;
		this.password = password;
		this.email = email;
		this.status = status;
		this.sex = sex;
		this.headImageUrl = headImageUrl;
		this.createDate = createDate;
		this.roleId = roleId;
		this.deptId = deptId;
	}

	private static final long serialVersionUID = 1L;

	//主键 
    private Integer id;
    //名字 
    private String name;
    //用户名 
    private String username;
    //密码 
    private String password;
    //博主邮箱 
    private String email;
    //用户状态
    private int status;
    //部门id
    private int deptId;
    //部门名称(虚拟字段)
    private String deptName;
    //性别：1男2女
    private int sex;
    //头像地址 
    private String headImageUrl;
    //创建时间
    @DateTimeFormat(pattern="yyyy-MM-dd hh:mm:ss")
    private Date createDate;
	//角色ID(虚拟字段)
    private int roleId;

    public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
    
	public int getRoleId() {
		return roleId;
	}

	public void setRoleId(int roleId) {
		this.roleId = roleId;
	}
	
	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}
	
	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	public int getSex() {
		return sex;
	}

	public void setSex(int sex) {
		this.sex = sex;
	}

	public String getHeadImageUrl() {
		return headImageUrl;
	}

	public void setHeadImageUrl(String headImageUrl) {
		this.headImageUrl = headImageUrl == null ? null : headImageUrl.trim();
	}

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username == null ? null : username.trim();
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password == null ? null : password.trim();
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email == null ? null : email.trim();
    }
    public String getDeptName() {
		return deptName;
	}

	public void setDeptName(String deptName) {
		this.deptName = deptName;
	}
    public int getDeptId() {
		return deptId;
	}

	public void setDeptId(int deptId) {
		this.deptId = deptId;
	}
    @Override
	public String toString() {
		return "Bloger [id=" + id + ", name=" + name + ", username=" + username + ", password=" + password + ", email="
				+ email + ", status=" + status + ", sex=" + sex + ", headImageUrl=" + headImageUrl + ", createDate="
				+ createDate + ", roleId=" + roleId + ", deptId=\" + deptId + \"]";
	}

}